{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import os\n",
    "import sys\n",
    "import pandas as pd \n",
    "\n",
    "sys.path.append(\"..\")\n",
    "\n",
    "DATA = os.path.normpath(\"../data/\")\n",
    "\n",
    "def load_data(name):\n",
    "    path = os.path.join(DATA, name, name + \".csv\")\n",
    "    return pd.read_csv(path)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "data = load_data(\"occupancy\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAA28AAAJXCAYAAAAEkWyIAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBo\ndHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAAIABJREFUeJzt3XmYXvP9//HXZA9JpLFF7btEmljb\nEqQS329t2SiCINqqpam1KVpZCCFEiqil2voRIpYmsa+xxE59tYQgllBqq6CRPTPz+wNTESOqJuMT\nj8d1ua65z32W9z0zIU/n3OeuqK6urg4AAABfaw3qewAAAAAWT7wBAAAUQLwBAAAUQLwBAAAUQLwB\nAAAUQLwBAAAUQLwBfE28+uqr2XTTTb+y/U2cODEnn3zy565z99135+yzz/7C648aNSrf//7307Nn\nz/Ts2TM9evRI165dc+qpp+br+skzBx10UJ5//vmvbH9vvvlmjjvuuHTv3j09evTIHnvskTvuuOO/\n2ueUKVOyww47pHfv3nn11Vf/4+3PPvvsTJgw4b+a4WMPP/xwNtxww/zqV79a5Ln99tvvC/2OfvL3\n6tO+yO8ZAJ+tUX0PAEDd6NatW7p16/a56zz55JN5//33v/D6SbLzzjtn0KBBNY/ff//99OjRI9ts\ns0223Xbb/27oOnDRRRd9ZfuaPn16+vTpkyOOOCKnnnpqKioq8swzz+TAAw9M8+bN07lz5y+134kT\nJ+Z73/teTjnllC+1/RFHHPGltqvNiiuumLvvvjuzZ89O8+bNkySvvfZaXnrppS+0/Sd/rz7ti/6e\nAbAo8QZQgBkzZuTEE0/MM888k4qKimy77bY5+uij06hRo9xzzz0ZMWJEGjRokHbt2uWBBx7ImDFj\n8sgjj+TWW2/NhRdemNtuuy3nn39+Kioq0rBhw/zqV79KkyZNMnbs2FRWVqZly5ZZc801a9Z/++23\nM3jw4Lz44otp0KBB+vTpk/333/8zZ/vnP/+ZOXPmZLnllkuSvPDCCznllFPy3nvvpbKyMvvtt19+\n9KMfJUl+//vf55prrsmyyy6bLbbYIhMnTsydd96Z4447Lu+9917+/ve/5wc/+EGOOOKIjBgxIo8+\n+mgqKyvTvn37nHDCCWnRokXGjBmTsWPHpnHjxmnatGlOOumkrLfeerUu79q1a84+++x85zvfyZVX\nXpnRo0enQYMGWWGFFTJw4MCsvfbaOe6449KiRYs8++yzeeONN7LOOutk5MiRWXbZZRd6rWPGjMlm\nm22WXr161SzbaKONMmrUqLRs2TJJ8pe//CWnn356Zs+encaNG+fII4/Mdtttl3HjxuX2229PgwYN\n8vLLL6dx48YZPnx4nnnmmVxxxRWprKzMnDlz0rlz55qfQ5KMGzeu5vFf/vKXnHbaaamqqkqSHHzw\nwfnhD3+Y4447Luuvv35+8pOf/MfH32CDDRb5mbZu3Tqrr7567rjjjnTv3j1JMmHChHTv3j1jx45N\nksyaNStDhgzJtGnT8v7772fZZZfNiBEjMmPGjEV+r6655prMnj07LVq0SO/evXPrrbfm7LPPzu67\n75599tkn++67b6655ppccsklueqqq2qCEYCFiTeAApx88slp3bp1rr/++syfPz+HHnpo/vSnP2WP\nPfbIr371q1xyySXZaKONMn78+IwfP36R7U8//fSMGDEim2yySe677748/PDD6d+/f/r06ZN33303\nRx11VMaNG1ez/oknnpi11lor5513XmbMmJG99947Xbp0SZLcdNNNeeyxxzJnzpy89957ad++fU48\n8cR07NgxCxYsyOGHH57TTz89G2+8cWbMmJG99tor6623XmbMmJFx48blmmuuScuWLfOb3/xmoRnn\nzJmTG2+8MUly7rnnpmHDhhk3blwqKioycuTIjBgxIgMHDsywYcNy5513ZqWVVsqECRPy2GOPZe21\n1/7M5eutt17N/h988MH84Q9/yJVXXpk2bdpk3Lhx+fnPf15zzMmTJ+fSSy9NRUVF9txzz9xyyy3Z\nfffdF5px8uTJn3l2cYsttkiSvPvuuzn88MNz/vnnp1OnTpk6dWr69u2ba665Jkny6KOP5oYbbkjb\ntm0zdOjQ/PGPf8zw4cPz8ssv5913382gQYMW+jl82qhRo3LggQdml112yTPPPJMrr7wyP/zhD2ue\n/7LH/yy9evXK1VdfXRNvN998c4YPH14Tb5MmTUqrVq1y1VVXJUkGDRqUyy+/PAMHDlzk9+r555/P\nnXfemRYtWtS8vmbNmmXkyJHZf//9s9pqq+W3v/1tRo8eLdwAPod4AyjApEmTcsUVV6SioiJNmjRJ\nnz59cskll2TttdfOuuuum4022ihJ0rt37898P9Euu+yS/v37p0uXLuncuXMOOuigzz3eAw88kAED\nBiRJWrZsmRtuuKHmuY8vm5w3b16GDh2aqVOnZrvttkuSTJs2La+88kp+/etf16w/Z86cPP3003nx\nxRez4447plWrVkmSfffdNw899FDNeptvvnnN13fffXdmzJiRBx54IEkyf/78LL/88mnYsGF23HHH\n9OnTJz/4wQ/SuXPndO/evdbln3Tvvfdm5513Tps2bZIku+22W0455ZSa95htu+22adKkSZJkgw02\n+MzL/ioqKj73vX1PPPFE1lhjjXTq1ClJsv7662ezzTbLI488koqKimy88cZp27ZtkqR9+/a5/fbb\na/8hfIaddtopJ510Uu68885svfXWOfroo+vs+Ntvv32GDBmSd955J9OmTcs666xTc3Y1SXbccces\nvvrqGT16dF5++eU88sgjtb4fbsMNN0yLFi0+c3n//v1z8MEH57TTTss666zzH30/AL5p3LAEoAAf\nXyb3yccLFixIw4YNF4mJBg0W/Vf7UUcdlSuuuCIdOnTIuHHjstdeey2yz09q1KhRKioqah7//e9/\nzwcffLDQOk2aNMnAgQMzc+bMnHHGGUmSysrKtGrVKtdee23NP1dddVV23333NGrUaKFZGzZsuND+\nlllmmYVe369//euafVx99dU1N8AYMWJELrjggqyxxhq56KKL0r9//89d/rHPiq7q6uosWLAgyYdn\ngj5WW6Rtsskm+etf/7rI8rFjx+biiy/+zO/pf3qMTy+fP39+zdd9+vTJddddl86dO+e+++5Ljx49\nMmPGjJrnv4rjf6xJkyb53//939xwww2ZMGFCevfuvdDzY8aMyW9+85s0a9Ys3bt3z6677lrr/j75\ns/20qVOnZoUVVsjf/va3WtcB4EPiDaAA22yzTS6//PJUV1dn3rx5ueqqq7L11ltns802y7Rp0/LM\nM88kSW699db861//Wii8FixYkK5du2bWrFnZe++9M3jw4Lzwwgs18ffxX+w/aauttsqf//znJB++\n3+6AAw7ItGnTFlmvSZMmGTx4cK688so89dRTWXvttdO0adNce+21SZLXX389u+66ayZPnpwuXbrk\ntttuq4mNjy/l+7zXO2/evFRVVWXgwIEZOXJkpk+fni5duqR169bp169fjjzyyDz77LO1Lv/0Pm+6\n6aZMnz49SfLnP/85rVu3zpprrvmFfw577bVXHnnkkVx33XU1oTJ58uScc8452WCDDdKpU6e89NJL\neeKJJ5J8GCaPPvpovvvd737hY7Rp0yZTp07N3Llzs2DBgtx11101z/Xp0ydTpkzJbrvtlqFDh+Zf\n//rXQmcIv4rjf1KvXr0yfvz4PProo4tcLnrfffeld+/e2WOPPbL22mvnzjvvTGVlZZLU+nv1abfd\ndlsefvjhXHfddbn//vv/67t2AiztXDYJ8DUya9asRS49Gzt2bE444YScfPLJ6d69e+bPn59tt902\nhxxySJo0aZKRI0fm2GOPTYMGDdKhQ4c0atRoofcNNWrUKL/+9a/zy1/+suaM2rBhw9KkSZNstdVW\n+cUvfpHGjRtn4403rtlm0KBBGTJkSLp3757q6uocfPDB6dChw0Ih8bEtttgi3bt3z9ChQ3PFFVfk\nvPPOyymnnJI//OEPWbBgQY444oiaSyL33HPP7LXXXmnWrFnWX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Vsm5ZFzRufH91+RigYN8taTz+b6gwZ+xRMD8E3RocN6GTVqQLp3PyqVlVVZbbWVcsUVw7LGGm3z\n5JPP57vfPSDz5s1Pz55dsv/+u9T3uLDUqKiuwzuI3HPPPTnzzDMzf/78rLHGGhk+fHhat279mevO\nnTs3kydPzsTuh2f2J063A8CSMrj62SSP1fcYAHxDzZ3bIZMnT06HDh3StGnTRZ6v089569KlS7p0\n6VKXhwAAAPhGcPcQAACAAog3AACAAog3AACAAog3AACAAog3AACAAog3AACAAog3AACAAog3AACA\nAog3AACAAog3AACAAog3AACAAog3AACAAog3AACAAog3AACAAog3AACAAog3AACAAog3AACAAog3\nAACAAog3AACAAog3AACAAog3AACAAog3AACAAog3AACAAog3AACAAog3AACAAog3AACAAog3AACA\nAog3AACAAog3AACAAog3AACAAog3AACAAog3AACAAog3AACAAog3AACAAog3AACAAog3AACAAog3\nAACAAog3AACAAog3AACAAog3AACAAog3AACAAog3AACAAog3AACAAog3AACAAog3AACAAog3AACA\nAog3AACAAog3AACAAog3AACAAog3AACAAog3AACAAog3AACAAog3AACAAog3AACAAog3AACAAog3\nAACAAog3AACAAog3AACAAog3AACAAog3AACAAog3AACAAog3AACAAog3AACAAog3AACAAog3AACA\nAog3AACAAog3AACAAog3AACAAog3AACAAog3AACAAog3AACAAog3AACAAog3AACAAog3AACAAog3\nAACAAog3AACAAog3AACAAog3AACAAog3AACAAog3AACAAog3AACAAog3AACAAog3AACAAog3AACA\nAog3AACAAog3AACAAog3AACAAog3AACAAog3AACAAog3AACAAog3AACAAog3AACAAog3AACAAog3\nAACAAog3AACAAog3AACAAog3AACAAog3AACAAog3AACAAog3AACAAog3AACAAog3AACAAog3AACA\nAog3AACAAog3AACAAog3AACAAiw23t5777088MADSZILL7wwhx9+eJ5//vk6HwwAAIB/W2y8HXPM\nMXnxxRfzwAMP5JZbbknXrl0zePDgJTEbAAAAH1lsvL3//vvp27dvJk6cmN69e6dXr16ZPXv2kpgN\nAACAjyw23qqqqjJ58u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OWJCuttFKOOOKIJTULAAAAtXDnEQAAgAKI\nNwAAgAJ8oXibNWtWnnnmmVRXV2fWrFl1PRMAAACfsth4e/DBB9OzZ88cdthhefvtt9O1a9fcd999\nS2I2AAAAPrLYeBs5cmTGjBmTVq1aZaWVVspll12W008/fUnMBgAAwEcWG29VVVVZccUVax6vt956\ndToQAAAAi/rcjwpIkrZt2+auu+5KRUVF/vWvf+Xyyy/Pt7/97SUxGwAAAB9Z7Jm3k046Kddff31e\nf/317LDDDpkyZUpOOumkJTEbAAAAH1nsmbfll18+I0eOXBKzAAAAUIvFxlvXrl1TUVGxyPKJEyfW\nyUAAAAAsarHxNnr06JqvFyxYkNtvvz3z5s2r06EAAABY2GLf87bqqqvW/LPmmmvmpz/9ae64444l\nMRsAAAAfWeyZt0cffbTm6+rq6kydOjVz586t06EAAABY2GLj7Zxzzqn5uqKiIt/61rdy2mmn1elQ\nAAAALGyx8bbTTjtln332WRKzAAAAUIvFvudtzJgxS2IOAAAAPsdiz7y1bds2+++/fzp16pSmTZvW\nLO/fv3+dDgYAAMC/LTbeNtlkkyUxBwAAAJ+j1ngbP358evfu7QwbAADA10Ct73m79NJLl+QcAAAA\nfI7F3rAEAACA+lfrZZNTp05Nt27dFlleXV2dioqKTJw4sU4HAwAA4N9qjbc111wzv//975fkLAAA\nANSi1nhr3LhxVl111SU5CwAAALWo9T1vm2222ZKcAwAAgM9Ra7wNGjRoSc4BAADA53C3SQAAgAKI\nNwAAgAKINwAAgAKINwAAgAKINwAAgAKINwAAgAKINwAAgAKINwAAgAKINwAAgAKINwAAgAKINwAA\ngAKINwAAgAKINwAAgAKINwAAgAKINwAAgAKINwAAgAKINwAAgAKINwAAgAKINwAAgAKINwAAgAKI\nNwAAgAKINwAAgAKINwAAgAKINwAAgAKINwAAgAKINwAAgAKINwAAgAKINwAAgAKINwAAgAKINwAA\ngAKINwAAgAKINwAAgAKINwAAgAKINwAAgAKINwAAgAKINwAAgAKINwAAgAKINwAAgAKINwAAgAKI\nNwAAgAKINwAAgAKINwAAgAKINwAAgAKINwAAgAKINwAAgAKINwAAgAKINwAAgAKINwAAgAKINwAA\ngAKINwAAgAKINwAAgAKINwAAgAKINwAAgAKINwAAgAKINwAAgAKINwAAgAKINwAAgAKINwAAgAKI\nNwAAgAKINwAAgAKINwAAgAKINwAAgAKINwAAgAKINwAAgAKINwAAgAKINwAAgAKINwAAgAKINwAA\ngAKINwAAgAKINwAAgAKINwAAgAKINwAAgAKINwAAgAKINwAAgAKINwAAgAKINwAAgAKINwAAgAKI\nNwAAgAKINwAAgAKINwAAgAKINwAAgAKINwAAgAKINwAAgAKINwAAgAKINwAAgAKINwAAgAKINwAA\ngAKINwAAgAKINwAAgAKINwAAgAKINwAAgAKINwAAgAKINwAAgAKINwAAgAKINwAAgAKINwAAgAKI\nNwAAgAKINwAAgAKINwAAgAJszWbJAAAOyklEQVSINwAAgAKINwAAgAKINwAAgAI0qu8BgP/eZZfd\nlDPOGJ2Kiooss0yznHPOL7PFFu3reywAljKjRj+W3132f2nerHHardsm5w76n7Rp3bzm+d37j88q\nK7XIuYP+J0ny5LNvZ+s+l2W9Nb5Vs87Y33bPhussv8Rnh6VBncZbdXV1jj/++Ky//vr5yU9+UpeH\ngm+sZ5+dlgEDzs7//d/lWWWVFXLTTfdlt90G5JVXbqzv0QBYitz10Ms5/aKH8+BV+2W1ti0zesJT\nOXjQrbn6nF5JktMvejj3/uXV7LnzRjXbPPD4a9l713b5/dAd62tsWKrU2WWTL7zwQg444IDcfPPN\ndXUIIEnTpk3yhz8MzCqrrJAk2WKL9nnjjXcyb978ep4MgKXJY0+9mR22XiurtW2ZJNntf9fP9Xe+\nkHnzKnPXQy/n1ntfysF9Nllomwcffy3PvDA93/vRpfnejy7NuNueq4/RYalRZ2feLr/88uy22275\n9re/XVeHAJKstda3s9ZaH/45q66uztFH/zY9emyXJk0a1/NkACxNvttxlYwa/Vhefu39rLnqcrl4\n3OTMm1+Zt9+dlSNPuTO3/HGPXHjlXxfaZpnmj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/l\nlVfSqJE/2gDUveeeey633HJLdtxxx/oeBb4R/A0PCnX00Udnr732SseOHWsum3zrrbfyxBNPZNiw\nYfU8HQDfBKeeemr+8Y9/ZKuttkqPHj3qexxY6rlsEgo2ffr03H///Xn99ddTXV2dVVZZJdtss03a\ntGlT36MB8A3xwgsvZMyYMRk4cGB9jwJLPfEGAABQAJ/zBgAAUADxBgAAUADxBsAS9+qrr6ZDhw7p\n2bNnevXqlV122SUHHnhg3njjjS+9z3HjxuW4445Lkhx00EF58803a133nHPOyV/+8pf/aP8bbrjh\nZy5/8cUXc8ghh6R79+7p3r17jjnmmEyfPj1JMmrUqIwaNeo/Og4A1Ea8AVAvVlpppVx77bWZMGFC\nbrzxxnTo0CFDhw79SvZ90UUXZeWVV671+UcffTSVlZX/9XHefPPN7L///tlzzz1z/fXX57rrrsv6\n66+f/v37/9f7BoBP81EBAHwtbLHFFrnzzjuTJF27dk3Hjh0zZcqUjBkzJvfee28uueSSVFVVZeON\nN87gwYPTtGnTTJgwIeeff35atGiRVVddNcsss0zN9pdeemlWXHHFnHjiiXnsscfSuHHjHHbYYZk3\nb14mT56cE044Ieeee26aNWuWIUOG5L333kuzZs0ycODAtG/fPq+++moGDBiQWbNmpVOnTp858xVX\nXJFtttkmXbt2TZJUVFTkoIMOymqrrZYFCxYstO5ll12Wa6+9NrNnz05FRUXOOuusrLvuuhk+fHju\nv//+NGzYMN26dUv//v3z4IMP5owzzkiSLLfccjnzzDPdRRYAZ94AqH/z58/PzTffnM0226xm2Xbb\nbZdbb70106dPz1VXXZWxY8fm2muvzfLLL58//vGPefPNNzNixIhcfvnlufLKKzNz5sxF9jt69OjM\nmjUrN998cy6++OL87ne/y84775wOHTrk5JNPzoYbbphjjz02AwYMyPjx4zN06NAcddRRSZKhQ4dm\nt912y7XXXrvQXJ80ZcqUdOzYcaFlDRs2zK677ppGjf79/0c/+OCD3HHHHRk9enRuuOGG7LDDDhkz\nZkxee+21TJo0Kdddd13Gjh2badOmZe7cuTnvvPMyZMiQjBs3Lttvv32efvrpr+LbDEDhnHkDoF68\n9dZb6dmzZ5Jk3rx56dixY4455pia5z8+2/Xwww/n5Zdfzp577pnkw9Br3759Hn/88Wy66aZZYYUV\nkiTdu3fPQw89tNAxHn300ey5555p0KBBVlxxxdx4440LPT9z5sxMnjw5xx9/fM2yWbNm5d13380j\njzySM888M0nSo0ePnHDCCYu8hoqKinyRT9xp0aJFzjzzzNx4442ZNm1a7r333rRr1y4rr7xymjZt\nmj59+mT77bfPkUcemaZNm9acgdthhx3SrVu3dO7cebHHAGDpJ94AqBcfv+etNk2bNk2SVFZWZqed\ndqqJp5kzZ6aysjIPPvhgqqqqatb/5Jmu2pa9/PLLWWWVVWoeV1VVpUmTJgvN8cYbb6R169ZJUhNm\nFRUVqaioWGT/HTp0yOTJkxdaVlVVlcMPPzxDhgypWfb6669nv/32S9++fbPddttlhRVWyJQpU9Ko\nUaNcffXVeeSRRzJp0qT06dMno0ePTr9+/bL99tvnrrvuyhlnnJEnnngihx56aK3fKwC+GVw2CcDX\n2ve+973cfvvteeedd1JdXZ0hQ4bkkksuyeabb56//e1vefPNN1NVVZWbbrppkW233HLL3Hzzzamu\nrs4777yTvn37Zt68eWnYsGEqKyvTsmXLrLXWWjXxdv/992ffffdNkmy99da57rrrkiS33XZb5s2b\nt8j+99prr9xzzz255557knwYe+edd17eeeedmjOCSfLkk09mzTXXTL9+/dKpU6dMmjQplZWVefrp\np9O3b99sueWWOfbYY7PuuuvmpZdeyh577JGZM2emX79+6devn8smAUjizBsAX3MbbbRR+vfvnwMO\nOCBVVVVp165dfvazn6Vp06Y54YQT0q9fvzRv3jzrrbfeItvus88+Ofnkk9OjR48kycCBA9OiRYts\nu+22GTx4cIYPH54zzjgjQ4YMyR/+8Ic0btw4v/3tb1NRUZFBgwZlwIABGTt2bL7zne9k2WWXXWT/\nK664Yi666KKcfvrpGTFiRCorK9O+ffv87ne/W2i9zp0754orrsjOO++cJk2apGPHjpk6dWrat2+f\nTTbZJLvuumuaN2+edu3aZbvttkvz5s1z3HHHpVGjRmnatGlOPPHEuvnmAlCUiuovcrE+AAAA9cpl\nkwAAAAUQbwAAAAUQbwAAAAUQbwAAAAUQbwAAAAUQbwAAAAUQbwAAAAUQbwAAAAX4/0NfmMcF2xSK\nAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 1080x720 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "from yellowbrick.classifier import ConfusionMatrix \n",
    "from sklearn.linear_model import LogisticRegression\n",
    "from sklearn.model_selection import train_test_split as tts\n",
    "\n",
    "features = [\"temperature\", \"relative humidity\", \"light\", \"C02\", \"humidity\"]\n",
    "\n",
    "# Extract the numpy arrays from the data frame \n",
    "X = data[features].as_matrix()\n",
    "y = data.occupancy.as_matrix()\n",
    "\n",
    "X_train, X_test, y_train, y_test = tts(X, y, test_size=0.2)\n",
    "\n",
    "oz = ConfusionMatrix(LogisticRegression(), size=(1080, 720))\n",
    "\n",
    "oz.fit(X_train, y_train)\n",
    "oz.score(X_test, y_test)\n",
    "oz.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
